Port mode handler APIs (ExitPlanMode, AutoModeSwitch) from reference implementation#183
Draft
Port mode handler APIs (ExitPlanMode, AutoModeSwitch) from reference implementation#183
Conversation
…delBilling.multiplier from the reference implementation Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
…om.xml CLI version, and update scripts/codegen @github/copilot version Co-authored-by: edburns <75821+edburns@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Sync reference implementation with latest commits
Port mode handler APIs (ExitPlanMode, AutoModeSwitch) from reference implementation
May 10, 2026
|
|
||
| session.handleExitPlanModeRequest(request).thenAccept(result -> { | ||
| try { | ||
| rpc.sendResponse(Long.parseLong(requestId), result); |
| } | ||
| }).exceptionally(ex -> { | ||
| try { | ||
| rpc.sendErrorResponse(Long.parseLong(requestId), -32603, |
|
|
||
| session.handleAutoModeSwitchRequest(request).thenAccept(response -> { | ||
| try { | ||
| rpc.sendResponse(Long.parseLong(requestId), java.util.Map.of("response", response.getValue())); |
| } | ||
| }).exceptionally(ex -> { | ||
| try { | ||
| rpc.sendErrorResponse(Long.parseLong(requestId), -32603, |
| * context information about the invocation | ||
| * @return a future that resolves with the user's decision | ||
| */ | ||
| CompletableFuture<ExitPlanModeResult> handle(ExitPlanModeRequest request, ExitPlanModeInvocation invocation); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #196
Before the change?
ExitPlanModeandAutoModeSwitchhandler APIs present in other SDK implementationsModelBilling.multiplierwas a primitivedouble, couldn't represent absent values.lastmergepointed to066a69c,@github/copilotat prior versionAfter the change?
671b50a(Restore mode handler APIs across SDKs):ExitPlanModeHandler/AutoModeSwitchHandlerfunctional interfaces with request/result/invocation typesSessionConfigandResumeSessionConfiggainonExitPlanMode/onAutoModeSwitchfields (with clone support)CreateSessionRequest/ResumeSessionRequestgainrequestExitPlanMode/requestAutoModeSwitchcapability flagsSessionRequestBuilderwires handlers and flags automaticallyCopilotSessionregisters handlers viaAtomicReference, dispatches with safe defaults (approved=true / NO)RpcHandlerDispatcherhandlesexitPlanMode.requestandautoModeSwitch.requestRPC methodsModelBilling.multiplierchanged fromdoubletoDouble(frome759700).lastmerge→f625779,@github/copilot→^1.0.44-3Not ported (not applicable to Java): Go/Rust/Node/Python SDK changes, CI fork restrictions, generated code changes, doc typos in ref-impl-only files.
Pull request checklist
mvn spotless:applyhas been run to format the codemvn clean verifypasses locallyDoes this introduce a breaking change?